<template>
	<view id="myview">
		<view id="myhead">
			<view><text>我的</text></view>
			<view>
				<view>
					<image :src="IP+imgsrc" mode=""></image>
				</view>
				<view><text>{{yonghudianhua}}</text></view>
				<view @click="shezhi"><text class="iconfont icon-shezhi1"></text></view>
			</view>
		</view>
		<view id="mydingdan">
			<view>
				<view>
				<text>我的订单</text>
				</view>
				<view>
					<view @click="wddd('待支付')">
						<view><text class="iconfont icon-daizhifu1" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">待支付</view>
					</view>
					<view @click="wddd('待发货')">
						<view><text class="iconfont icon-daifahuo" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">待发货</view>
					</view>
					<view @click="wddd('待收货')">
						<view><text class="iconfont icon-daishouhuo" style="font-size: 60rpx;font-weight: bold;"></text></view>
						<view class="yangshi">待收货</view>
					</view>
					<view @click="wddd('已完成')">
						<view><text class="iconfont icon-trues" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">已完成</view>
					</view>
					<view @click="wddd('已取消')">
						<view><text class="iconfont icon-yiquxiao" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">已取消</view>
					</view>
					<view>
						<view><text class="iconfont icon-tuikuanshouhou" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">退款售后</view>
					</view>
				</view>
			</view>
			
		</view>
		<view id="mypintuan">
			<view>
				<view>
				<text>我的拼团</text>
				</view>
				<view>
					<view @click="pt()">
						<view><text class="iconfont icon-daizhifu1" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">待支付</view>
					</view>
					<view @click="pt()">
						<view><text class="iconfont .icon-daifahuo" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">拼团中</view>
					</view>
					<view @click="pt()">
						<view><text class="iconfont icon-daifahuo" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">待发货</view>
					</view>
					<view @click="pt()">
						<view><text class="iconfont icon-trues" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">已完成</view>
					</view>
					<view @click="pt()">
						<view><text class="iconfont icon-yiquxiao" style="font-size: 60rpx;"></text></view>
						<view class="yangshi">拼团失败</view>
					</view>
				</view>
			</view>
		</view>
		<view id="changyonggongju">
			<view>
				<view>
				<text>常用工具</text>
				</view>
				<view>
					<view>
						<navigator url="./dizhiguanli" open-type='navigate'>
						<view><text class="iconfont icon-dizhi" style="font-size: 60rpx;"></text></view>
						<!-- <navigator url="./dizhiguanli" open-type='navigate'>地址管理</navigator> -->
						<view>地址管理</view></navigator>
					</view>
					<view>
						<navigator url="./chufangguanli" open-type='navigate'>
						<view><text class="iconfont icon-chufang" style="font-size: 60rpx;"></text></view>
						<view>处方管理</view>
						</navigator>
					</view>
					<view>
						<navigator url="./youhuiquan" open-type='navigate'>
						<view><text class="iconfont icon-daizhifu1" style="font-size: 60rpx;"></text></view>
						<view>优惠券</view>
						</navigator>
					</view>
					<view>
						<navigator url="./zaixiankefu" open-type='navigate'>
						<view><text class="iconfont icon-zaixiankefu" style="font-size: 60rpx;"></text></view>
						<view>在线客服</view>
						</navigator>
					</view>
					<view>
						<navigator url="./yijianfankui" open-type='navigate'>
						<view><text class="iconfont icon-yijianfankui" style="font-size: 60rpx;"></text></view>
						<view>意见反馈</view>
						</navigator>
					</view>
				</view>
			</view>
		</view>
		<view id="aa"></view>
	</view>
</template>

<script>
	import {ref,reactive,toRefs,onMounted,computed} from 'vue'
	import http from '../../utils/http.js'
	import store from '../../store/index.js'
	export default {
		setup(){
			let data=reactive({
				imgsrc:'',
				yonghuData:[],
				yonghudianhua:'',
				y_id:'',
				IP:computed(()=>store.state.IP),
				shezhi:()=>{
					uni.navigateTo({
						url:'../shezhi/shezhi'
					})
				},
				pt(e){
					console.log(e)
					uni.navigateTo({url:'/pages/ptdaizhifu/ptdaizhifu'})
				},
				// 我的订单跳转
				wddd(e){
					console.log(e)
					uni.navigateTo({
						url:'/pages/myorder/order?iskind='+e
					})
				}
			})
			return{...toRefs(data)}
		},
		onShow() {
			this.y_id=store.state.userID
			http({
				url:'/appMineGetYonghuData',
				method:'get',
				data:{
					y_id:this.y_id
				}
			}).then((res)=>{
				this.yonghuData=res.data.data
				this.imgsrc=this.yonghuData[0].y_imgsrc
				console.log(res.data.data)
				this.yonghudianhua=res.data.data[0].y_tel
				console.log(res.data.data[0].y_tel)
			})
		}
	}
</script>

<style lang="less">
	@import url("~@/static/fonts/iconfont.css");
#myhead{
	width: 750rpx;
	height: 225rpx;
	background-color: #da2222;
	color: white;
	>view:nth-child(1){
		padding-top: 10rpx;
		margin-left: 20rpx;
		box-sizing: border-box;
	}
	>view:nth-child(2){
		display: flex;
	}
	>view:nth-child(2)>view:nth-child(1){
		width: 100rpx;
		height: 100rpx;
		margin-left: 20rpx;
		margin-top: 20rpx;
		border: 4px solid white;
		border-radius: 100rpx;
		overflow: hidden;
		image{
			width: 100rpx;
			height: 100rpx;
		}
	}
	>view:nth-child(2)>view:nth-child(2){
		margin-left: 20rpx;
		width:465rpx;
		height: 100rpx;
		line-height: 100rpx;
		margin-top: 24rpx;
	}
	>view:nth-child(2)>view:nth-child(3){
		margin-left: 20rpx;
		width:100rpx;
		height:100rpx;
		line-height: 100rpx;
		margin-top: 24rpx;
	}
}
#mydingdan{
	width: 750rpx;
	>view:nth-child(1){
		width: 750rpx;
		height: 370rpx;
		background-color: #f2f2f2;
		padding-top: 25rpx;
		box-sizing: border-box;
		>view:nth-child(1){
			width: 750rpx;
			height: 110rpx;
			background-color: white;
			padding-left: 30rpx;
			box-sizing: border-box;
			line-height: 110rpx;
		}
		>view:nth-child(2){
			display: flex;
			font-size: 30rpx;
			width: 750rpx;
			height: 240rpx;
			justify-content: space-between;
			background-color: white;
			view{
				flex: 1;
				text-align: center;
			}
			>view view:nth-child(1){
				margin-top: 30rpx;
			}
		}
	}
}
#mypintuan{
	width: 750rpx;
	height: 370rpx;
	background-color: #f2f2f2;
	display: flex;
	align-items: flex-end;
	>view{
		width: 750rpx;
		height: 370rpx;
		background-color: #f2f2f2;
		padding-top: 25rpx;
		box-sizing: border-box;
		>view:nth-child(1){
			width: 750rpx;
			height: 110rpx;
			background-color: white;
			padding-left: 30rpx;
			box-sizing: border-box;
			line-height: 110rpx;
		}
		>view:nth-child(2){
			display: flex;
			font-size: 30rpx;
			width: 750rpx;
			height: 240rpx;
			justify-content: space-between;
			background-color: white;
			view{
				flex: 1;
				text-align: center;
			}
			>view view:nth-child(1){
				margin-top: 30rpx;
			}
		}
	}
}
#changyonggongju{
	width: 750rpx;
	height: 370rpx;
	background-color: #f2f2f2;
	display: flex;
	align-items: flex-end;
	>view{
		width: 750rpx;
		height: 370rpx;
		background-color: #f2f2f2;
		padding-top: 25rpx;
		box-sizing: border-box;
		>view:nth-child(1){
			width: 750rpx;
			height: 110rpx;
			background-color: white;
			padding-left: 30rpx;
			box-sizing: border-box;
			line-height: 110rpx;
		}
		>view:nth-child(2){
			display: flex;
			font-size: 30rpx;
			width: 750rpx;
			height: 350rpx;
			background-color: white;
			flex-wrap: wrap;
			justify-content: flex-start;
			view{
				width: 250rpx;
				text-align: center;
			}
			>view view:nth-child(1){
				margin-top: 30rpx;
			}
			>view view:nth-child(2){
				margin-top:20rpx;
			}
		}
	}
}
.yangshi{
	margin-top: 10rpx;
}
#aa{
	width: 750rpx;
	height: 180rpx;
	background-color: #f2f2f2;
}
</style>
